package interface2;


public class Test
{
    public static void main(String[] args)
    {
          //接口弥补了类单继承的不足，可以让类拥有更多角色，类的功能更加强大。
        Driver d = new Student();
        Driver a = new Teacher();

        //接口可以实现面向接口编程，更利于解耦和
        Boyfriend b = new Teacher();
        Boyfriend c = new Student();
    }
}

class People
{

}
interface Driver
{

}
interface Boyfriend
{

}

class Student extends People implements Driver, Boyfriend
{

}

class Teacher implements Driver, Boyfriend
{

}
